home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-08-09 | 2.9 KB | 70 lines | [TEXT/KAHL] |
- //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- // //
- // //
- // Copyright PennyWise Software, 1994. //
- // //
- // Part of the PennyWise Software Application Framework //
- // //
- // //
- // DialogUtils.h Written by Peter Kaplan //
- // //
- // //
- //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- // //
- // This file relies on WindowUtils for some if its drawing functions. //
- // //
- //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- #ifndef _DIALOG_UTILITIES_
- #define _DIALOG_UTILITIES_
-
- // We need WindowUtils.h
- #include <PWWindowUtils.h>
-
- // This is used by Popupmenus
- typedef struct PopupPrivateData {
- MenuHandle menuHandle;
- long menuID;
- }PopupPrivateData, *PopupPrivatePtr, **PopupPrivateHandle;
-
- // These are Apple Supplied routines that were not in the headers that symantec supplied
- // They are in later versions of the Apple Headers
- pascal OSErr SetDialogDefaultItem (DialogPtr theDialog, short newItem) = {0x303C,0x0304,0xAA68};
- pascal OSErr SetDialogCancelItem (DialogPtr theDialog,short newItem) = {0x303C,0x0305,0xAA68};
-
- // Routines to get the info on a DITL item
- extern short GetDItemType(WindowPtr theDialog, short theItem);
- extern Handle GetDItemHandle(WindowPtr theDialog, short theItem);
- extern Rect GetDItemRect(WindowPtr theDialog, short theItem);
-
- // Routines to check DITL item for a type of Control
- extern Boolean IsButton(WindowPtr theDialog, short theItem);
- extern Boolean IsRadio(WindowPtr theDialog, short theItem);
- extern Boolean IsCheckBox(WindowPtr theDialog, short theItem);
- extern Boolean IsOtherControl(WindowPtr theDialog, short theItem);
-
- // Toggling items
- extern void FlashButton(WindowPtr theDialog, short theItem);
- extern void HiliteDItem(WindowPtr theDialog, short theItem, short value);
-
- extern void FrameItem(WindowPtr theDialog, short theItem, long color);
-
- // Outline Button Drawing
- extern void DrawButtonOutlineItem(WindowPtr theDialog, short theItem, long color);
- extern void EraseButtonOutlineItem(WindowPtr theDialog, short theItem);
-
- // Item Focus Drawing
- extern void DrawFocusItem(WindowPtr theDialog, short theItem, long color);
- extern void EraseFocusItem(WindowPtr theDialog, short theItem);
-
- // Text in text items
- extern void GetDText(DialogPtr theDialog, short theItem, unsigned char * theString);
- extern void SetDText(DialogPtr theDialog, short theItem, unsigned char * theString);
-
- // Values in control Items
- extern void SetDValue(DialogPtr theDialog, short theItem, short theValue);
- extern short GetDValue(DialogPtr theDialog, short theItem);
-
- // Strings in popup items
- extern void GetPopUpItemString(WindowPtr theDialog, short theItem, unsigned char * theString);
-
- #endif